/**
 * Created by yqj on 2017/2/20.
 */
const mongoose = require('../db'),
    dictionarySchema = require('../schemas/dictionary-schema.js');

//middleware
dictionarySchema.pre('save',function(next){
    //做点什么
    next();
});

dictionarySchema.pre('update',function(next){
    //做点什么
    next();
});

dictionarySchema.pre('remove',function(next){
    //做点什么
    next();
});

dictionarySchema.pre('find',function(next){
    //做点什么
    next();
});

const DictionaryModel = mongoose.model('User',dictionarySchema);

module.exports = DictionaryModel;